package system.bean;

import java.util.Collection;
import java.util.Vector;

import util.ObjectRelationMappable;
import util.ObjectRelationMappingUtil;

public class DocRelation implements ObjectRelationMappable{
	private int    mainDocId;
	private int    relatedDocId;
	private String relationType;
	
	public final static String tableName = "docrelation";
	private final static Vector<DocRelation> orProperties = new Vector<DocRelation>();
	
	private static void initORProperties(DocRelation document){
		if (orProperties.size() > 0)return;
        ObjectRelationMappingUtil.addORProperty(document, "mainDocId"    , "mainDocId"    , orProperties);
        ObjectRelationMappingUtil.addORProperty(document, "relatedDocId" , "relatedDocId" , orProperties);
        ObjectRelationMappingUtil.addORProperty(document, "relationType" , "relationType" , orProperties);
	}
	
	public DocRelation(){
		initORProperties(this);
	}
	
	public int getMainDocId() {
		return mainDocId;
	}
	public void setMainDocId(int mainDocId) {
		this.mainDocId = mainDocId;
	}
	public int getRelatedDocId() {
		return relatedDocId;
	}
	public void setRelatedDocId(int relatedDocId) {
		this.relatedDocId = relatedDocId;
	}
	public String getRelationType() {
		return relationType;
	}
	public void setRelationType(String relationType) {
		this.relationType = relationType;
	}
	@Override
	public Collection<DocRelation> getORProperties() {
		// TODO Auto-generated method stub
		return orProperties;
	}
	@Override
	public String getTableName() {
		// TODO Auto-generated method stub
		return tableName;
	}
}
